/*
 * requestmanager.h
 *
 *  Created on: Aug 28, 2011
 *      Author: anonovermind <anonovermind@gmail.com>
 */

#ifndef REQUESTMANAGER_H_
#define REQUESTMANAGER_H_

#include <string>
#include <boost/signals2.hpp>
#include "request.h"
#include "url.h"
#include "networkmedium.h"

namespace Wishmaster2
{

namespace Network
{

class RequestManager
{
public:
	virtual ~RequestManager() {}

	virtual void registerMedium(NetworkMedium* media) = 0;
	virtual void unregisterMedium(const std::string& protocol) = 0;

	virtual RequestPtr createRequest(const Url& url) = 0;
	virtual bool enqueueRequest(const RequestPtr& request) = 0;
	virtual void acknowledgeRequest(int id) = 0;
	virtual void setQueueDepth(int depth) = 0;
	virtual RequestPtr request(int id) const = 0;

	virtual void saveSettings(const std::string& path) = 0;
	virtual void loadSettings(const std::string& path) = 0;

};

}

}


#endif /* REQUESTMANAGER_H_ */
